home *** CD-ROM | disk | FTP | other *** search
/ Champak 139 / (Vol 139) Sep 24 2011.iso / Games / stonagesam.swf / scripts / frame_5 / DoAction.as
Encoding:
Text File  |  2011-09-24  |  65.3 KB  |  1,495 lines

  1. function ┬º\x04\x05┬º()
  2. {
  3.    set("\x03",1193 % 511 * true);
  4.    return eval("\x03");
  5. }
  6. var ┬º\x01┬º = 596 + "\x04\x05"();
  7. while(true)
  8. {
  9.    if(eval("\x01") == 767)
  10.    {
  11.       set("\x01",eval("\x01") - 257);
  12.       ┬º┬ºpush(true);
  13.    }
  14.    else if(eval("\x01") == 601)
  15.    {
  16.       set("\x01",eval("\x01") - 505);
  17.    }
  18.    else if(eval("\x01") == 961)
  19.    {
  20.       set("\x01",eval("\x01") - 865);
  21.    }
  22.    else if(eval("\x01") == 413)
  23.    {
  24.       set("\x01",eval("\x01") - 164);
  25.       var ┬º┬ºpop() = function ┬º\x04\x05┬º()
  26.       {
  27.          set("\x03",1193 % 511 * true);
  28.          return eval("\x03");
  29.       };
  30.    }
  31.    else
  32.    {
  33.       if(eval("\x01") == 657)
  34.       {
  35.          set("\x01",eval("\x01") - 56);
  36.          break;
  37.       }
  38.       if(eval("\x01") == 96)
  39.       {
  40.          set("\x01",eval("\x01") + 317);
  41.          ┬º┬ºpush("\x0f");
  42.          ┬º┬ºpush(1);
  43.       }
  44.       else if(eval("\x01") == 510)
  45.       {
  46.          set("\x01",eval("\x01") + 147);
  47.          if(function ┬º\x04\x05┬º()
  48.          {
  49.             set("\x03",1193 % 511 * true);
  50.             return eval("\x03");
  51.          })
  52.          {
  53.             set("\x01",eval("\x01") - 56);
  54.          }
  55.       }
  56.       else if(eval("\x01") == 249)
  57.       {
  58.          set("\x01",eval("\x01") - 88);
  59.          ┬º┬ºpush("\x0f");
  60.       }
  61.       else if(eval("\x01") == 161)
  62.       {
  63.          set("\x01",eval("\x01") - 130);
  64.          ┬º┬ºpush(eval(function ┬º\x04\x05┬º()
  65.          {
  66.             set("\x03",1193 % 511 * true);
  67.             return eval("\x03");
  68.          }));
  69.       }
  70.       else if(eval("\x01") == 31)
  71.       {
  72.          set("\x01",eval("\x01") + 434);
  73.          ┬º┬ºpush(!function ┬º\x04\x05┬º()
  74.          {
  75.             set("\x03",1193 % 511 * true);
  76.             return eval("\x03");
  77.          });
  78.       }
  79.       else
  80.       {
  81.          if(eval("\x01") == 602)
  82.          {
  83.             set("\x01",eval("\x01") + 386);
  84.             stop();
  85.             _global.firstplay = true;
  86.             _global.score = 0;
  87.             game = {score:0};
  88.             if(_global.firstplay)
  89.             {
  90.                game.level = 1;
  91.                _global.firstplay = false;
  92.             }
  93.             var pos1achieve = false;
  94.             var pos2achieve = false;
  95.             _global.item = false;
  96.             _global.timeStep = 0;
  97.             _global.oldPos = 0;
  98.             _global.debugTrace = function(txt)
  99.             {
  100.                debug_txt.text = txt;
  101.                trace(txt);
  102.             };
  103.             loadLevel = function(lvl)
  104.             {
  105.                _root.attachMovie("skybackground","skybackground",0);
  106.                stopAllSounds();
  107.                _root.paws = false;
  108.                _root.panels._visible = false;
  109.                trace("setting up level");
  110.                _global.double = false;
  111.                _global.cavemanPos = 0;
  112.                _global.walking = false;
  113.                _global.step = 1;
  114.                _root.paws = false;
  115.                game.level = lvl;
  116.                switch(lvl)
  117.                {
  118.                   case 1:
  119.                      _root.attachMovie("level1","gamelevel",1);
  120.                      _global.stick = false;
  121.                      _global.rock = false;
  122.                      _global.crocs = false;
  123.                      _global.screenY = 0;
  124.                      _global.screenX = 0;
  125.                      setTimeOut(birdfall,2000);
  126.                      _global.stickGlow = function()
  127.                      {
  128.                         _root.gamelevel.stick_mc.play();
  129.                      };
  130.                      _global.buttonVis = function(btn)
  131.                      {
  132.                         _root.gamelevel.button_1._visible = false;
  133.                         _root.gamelevel.button_2._visible = false;
  134.                         _root.gamelevel.button_3._visible = false;
  135.                         _root.gamelevel.button_4._visible = false;
  136.                         _root.gamelevel.button_5._visible = false;
  137.                         _root.gamelevel.button_6._visible = false;
  138.                         _root.gamelevel.button_7._visible = false;
  139.                         _root.gamelevel.button_8._visible = false;
  140.                         _root.gamelevel.button_9._visible = false;
  141.                         i = 0;
  142.                         while(i < btn.length)
  143.                         {
  144.                            var _loc2_ = btn[i];
  145.                            _root.gamelevel[_loc2_]._visible = true;
  146.                            i++;
  147.                         }
  148.                      };
  149.                      _global.buttonVis(["button_1","button_2"]);
  150.                      _global.stepTrue = function(pos)
  151.                      {
  152.                         if(pos == _global.cavemanPos)
  153.                         {
  154.                            return false;
  155.                         }
  156.                         switch(pos)
  157.                         {
  158.                            case 1:
  159.                               if(_global.step == 1)
  160.                               {
  161.                                  _root.gamelevel.char._alpha = 0;
  162.                                  _root.gamelevel.caveman_crocs._alpha = 100;
  163.                                  _root.gamelevel.caveman_crocs.play();
  164.                               }
  165.                               break;
  166.                            case 3:
  167.                               if(_global.step == 2)
  168.                               {
  169.                                  return true;
  170.                               }
  171.                               break;
  172.                            case 4:
  173.                               if(_global.step == 2)
  174.                               {
  175.                                  return true;
  176.                               }
  177.                               break;
  178.                            case 6:
  179.                               if(_global.step == 3)
  180.                               {
  181.                                  trace("CROC + " + _global.crocs);
  182.                                  if(!_global.crocs)
  183.                                  {
  184.                                     _global.goPlayAnim = "caveman_5_7";
  185.                                  }
  186.                                  else
  187.                                  {
  188.                                     _global.goPlayAnim = "caveman_5_6";
  189.                                  }
  190.                                  _root.gamelevel.crocs2.crocs.stop();
  191.                                  _global.walking = true;
  192.                                  _root.gamelevel.char._visible = false;
  193.                                  _root.gamelevel[_global.goPlayAnim]._visible = true;
  194.                                  _root.gamelevel[_global.goPlayAnim]._alpha = 100;
  195.                                  _root.gamelevel[_global.goPlayAnim].gotoAndPlay(2);
  196.                                  _global.debugTrace("walking from pos " + _global.cavemanPos + " to pos " + pos);
  197.                                  _global.step = 4;
  198.                               }
  199.                               break;
  200.                            case 7:
  201.                               if(_global.step == 4)
  202.                               {
  203.                                  _global.step = 4;
  204.                                  _global.rock = true;
  205.                                  return true;
  206.                               }
  207.                               break;
  208.                            case 8:
  209.                               if(_global.step == 4)
  210.                               {
  211.                                  return true;
  212.                               }
  213.                               break;
  214.                            case 9:
  215.                               if(_global.step == 4)
  216.                               {
  217.                                  return true;
  218.                               }
  219.                               break;
  220.                            default:
  221.                               break;
  222.                            case 2:
  223.                               if(_global.step == 1)
  224.                               {
  225.                                  _global.step = 2;
  226.                                  _global.buttonVis([]);
  227.                                  return true;
  228.                               }
  229.                               return false;
  230.                               break;
  231.                            case 5:
  232.                               _global.step = 3;
  233.                               return true;
  234.                         }
  235.                         return false;
  236.                      };
  237.                      _global.buttonCheck = function(flag)
  238.                      {
  239.                         trace("CHECKIN");
  240.                         _global.walking = false;
  241.                         _root.step_txt.text = "step - " + _global.step;
  242.                         _root.pos_txt.text = "pos - " + _global.cavemanPos;
  243.                         switch(_global.cavemanPos)
  244.                         {
  245.                            case 1:
  246.                               return 3;
  247.                            case 2:
  248.                               _global.buttonVis(["button_3","button_4"]);
  249.                               return 1;
  250.                            case 3:
  251.                               _global.stick = true;
  252.                               _global.buttonVis(["button_4"]);
  253.                               return 5;
  254.                            case 4:
  255.                               if(_global.stick)
  256.                               {
  257.                                  _global.buttonVis(["button_6"]);
  258.                                  _root.gamelevel.boulder.play();
  259.                                  _global.goPlayAnim = "caveman_4_4";
  260.                                  setTimeout(goPlay,3000);
  261.                                  return 4;
  262.                               }
  263.                               return 2;
  264.                               break;
  265.                            case 5:
  266.                               _global.step = 3;
  267.                               return 1;
  268.                            case 6:
  269.                               if(!_global.crocs)
  270.                               {
  271.                                  _global.buttonVis(["button_7","button_8","button_9"]);
  272.                                  return 1;
  273.                               }
  274.                               return 3;
  275.                               break;
  276.                            case 7:
  277.                               _global.buttonVis(["button_8","button_9"]);
  278.                               return 1;
  279.                            case 8:
  280.                               return 1;
  281.                            case 9:
  282.                               if(_global.rock)
  283.                               {
  284.                                  _global.buttonVis(["button_8"]);
  285.                                  return 1;
  286.                               }
  287.                               return 3;
  288.                               break;
  289.                            default:
  290.                               return 1;
  291.                         }
  292.                      };
  293.                      break;
  294.                   case 2:
  295.                      _root.attachMovie("level2","gamelevel",1);
  296.                      _root.gamelevel._y = -420;
  297.                      _global.screenY = -420;
  298.                      _global.screenX = 0;
  299.                      _global.stick = false;
  300.                      _global.rock = false;
  301.                      _global.flint = false;
  302.                      _global.boulder = false;
  303.                      _global.fire = false;
  304.                      _global.buttonVis = function(btn)
  305.                      {
  306.                         _root.gamelevel.button_1._visible = false;
  307.                         _root.gamelevel.button_2._visible = false;
  308.                         _root.gamelevel.button_3._visible = false;
  309.                         _root.gamelevel.button_4._visible = false;
  310.                         _root.gamelevel.button_5._visible = false;
  311.                         _root.gamelevel.button_6._visible = false;
  312.                         _root.gamelevel.button_7._visible = false;
  313.                         _root.gamelevel.button_8._visible = false;
  314.                         _root.gamelevel.button_9._visible = false;
  315.                         _root.gamelevel.button_10._visible = false;
  316.                         _root.gamelevel.button_11._visible = false;
  317.                         _root.gamelevel.button_12._visible = false;
  318.                         i = 0;
  319.                         while(i < btn.length)
  320.                         {
  321.                            var _loc2_ = btn[i];
  322.                            _root.gamelevel[_loc2_]._visible = true;
  323.                            i++;
  324.                         }
  325.                      };
  326.                      _global.buttonVis(["button_1","button_2"]);
  327.                      _global.stepTrue = function(pos)
  328.                      {
  329.                         if(pos == _global.cavemanPos)
  330.                         {
  331.                            return false;
  332.                         }
  333.                         switch(pos)
  334.                         {
  335.                            case 1:
  336.                               if(_global.step == 1)
  337.                               {
  338.                                  _global.stick = true;
  339.                                  return true;
  340.                               }
  341.                               break;
  342.                            case 2:
  343.                               if(_global.step == 1)
  344.                               {
  345.                                  _global.rock = true;
  346.                                  return true;
  347.                               }
  348.                               break;
  349.                            case 3:
  350.                               if(_global.step == 1 && _global.stick && _global.rock)
  351.                               {
  352.                                  _global.step = 2;
  353.                                  return true;
  354.                               }
  355.                               break;
  356.                            case 4:
  357.                               if(_global.step == 2)
  358.                               {
  359.                                  return true;
  360.                               }
  361.                               break;
  362.                            case 5:
  363.                               if(_global.step == 2)
  364.                               {
  365.                                  _global.step = 3;
  366.                                  return true;
  367.                               }
  368.                               break;
  369.                            case 6:
  370.                               if(_global.step == 3)
  371.                               {
  372.                                  _global.flint = true;
  373.                                  return true;
  374.                               }
  375.                               break;
  376.                            case 7:
  377.                               if(_global.step == 3)
  378.                               {
  379.                                  if(!_global.flint)
  380.                                  {
  381.                                     return true;
  382.                                  }
  383.                                  _global.screenX = -574;
  384.                                  _global.screenY = -103;
  385.                                  _root.gamelevel.char._visible = false;
  386.                                  _root.gamelevel.caveman_run_1._alpha = 100;
  387.                                  _root.gamelevel.caveman_run_1.play();
  388.                                  _global.step = 4;
  389.                               }
  390.                               break;
  391.                            case 8:
  392.                               if(_global.step == 4)
  393.                               {
  394.                                  return true;
  395.                               }
  396.                               break;
  397.                            case 9:
  398.                               if(_global.step == 4)
  399.                               {
  400.                                  _root.gamelevel.char._visible = false;
  401.                               }
  402.                               _root.gamelevel.caveman_run_2._alpha = 100;
  403.                               _root.gamelevel.caveman_run_2.play();
  404.                               _global.step = 5;
  405.                               break;
  406.                            case 10:
  407.                               if(_global.step == 5)
  408.                               {
  409.                                  trace("DEAD");
  410.                                  return true;
  411.                               }
  412.                               break;
  413.                            case 11:
  414.                               if(_global.step == 5)
  415.                               {
  416.                                  _global.fire = true;
  417.                                  return true;
  418.                               }
  419.                               break;
  420.                            case 12:
  421.                               if(_global.step == 5)
  422.                               {
  423.                                  _global.boulder = true;
  424.                                  _global.buttonVis(["button_10","button_11"]);
  425.                                  return true;
  426.                               }
  427.                               break;
  428.                         }
  429.                         return false;
  430.                      };
  431.                      _global.buttonCheck = function(flag)
  432.                      {
  433.                         trace("CHECKIN");
  434.                         _global.walking = false;
  435.                         _root.step_txt.text = "step - " + _global.step;
  436.                         _root.pos_txt.text = "pos - " + _global.cavemanPos;
  437.                         switch(_global.cavemanPos)
  438.                         {
  439.                            case 1:
  440.                               if(_global.rock)
  441.                               {
  442.                                  _global.buttonVis(["button_3"]);
  443.                                  setTimeout(addItem,1500,18);
  444.                               }
  445.                               else
  446.                               {
  447.                                  _global.buttonVis(["button_2"]);
  448.                               }
  449.                               return 1;
  450.                            case 2:
  451.                               if(_global.stick)
  452.                               {
  453.                                  _global.buttonVis(["button_3"]);
  454.                                  setTimeout(addItem,1500,18);
  455.                               }
  456.                               else
  457.                               {
  458.                                  _global.buttonVis(["button_1"]);
  459.                               }
  460.                               return 1;
  461.                            case 3:
  462.                               _global.buttonVis(["button_4"]);
  463.                               _global.screenY = -176;
  464.                               return 1;
  465.                            case 4:
  466.                               _global.buttonVis(["button_5"]);
  467.                               return 1;
  468.                            case 5:
  469.                               _global.buttonVis(["button_6","button_7"]);
  470.                               _global.step = 3;
  471.                               _global.screenX = -224;
  472.                               _global.screenY = -103;
  473.                               return 1;
  474.                            case 6:
  475.                               return 1;
  476.                            case 7:
  477.                               return 1;
  478.                            case 8:
  479.                               return 3;
  480.                            case 9:
  481.                               return 1;
  482.                            case 10:
  483.                               return 3;
  484.                            case 11:
  485.                               if(_global.boulder)
  486.                               {
  487.                                  _global.buttonVis([]);
  488.                               }
  489.                               else
  490.                               {
  491.                                  _global.buttonVis(["button_10","button_12"]);
  492.                               }
  493.                               return 1;
  494.                            case 12:
  495.                               if(_global.fire)
  496.                               {
  497.                                  _global.buttonVis([]);
  498.                                  _root.gamelevel.fire4._alpha = 100;
  499.                               }
  500.                               else
  501.                               {
  502.                                  _global.buttonVis(["button_10","button_11"]);
  503.                               }
  504.                               return 1;
  505.                            default:
  506.                               return 1;
  507.                         }
  508.                      };
  509.                      break;
  510.                   case 3:
  511.                      _root.attachMovie("level3","gamelevel",1);
  512.                      _global.screenY = 0;
  513.                      _global.screenX = 0;
  514.                      _global.width = 836.8;
  515.                      _global.stick = false;
  516.                      _global.stick2 = false;
  517.                      _global.rock = false;
  518.                      _global.sinew = false;
  519.                      _global.wolvesfed = false;
  520.                      _global.wolfscare = 0;
  521.                      _global.water = false;
  522.                      _global.waterstart = false;
  523.                      _global.deerscare = false;
  524.                      _global.buttonVis = function(btn)
  525.                      {
  526.                         _root.gamelevel.button_1._visible = false;
  527.                         _root.gamelevel.button_2._visible = false;
  528.                         _root.gamelevel.button_3._visible = false;
  529.                         _root.gamelevel.button_4._visible = false;
  530.                         _root.gamelevel.button_5._visible = false;
  531.                         _root.gamelevel.button_6._visible = false;
  532.                         _root.gamelevel.button_7._visible = false;
  533.                         _root.gamelevel.button_8._visible = false;
  534.                         _root.gamelevel.button_9._visible = false;
  535.                         _root.gamelevel.button_10._visible = false;
  536.                         i = 0;
  537.                         while(i < btn.length)
  538.                         {
  539.                            var _loc2_ = btn[i];
  540.                            _root.gamelevel[_loc2_]._visible = true;
  541.                            i++;
  542.                         }
  543.                      };
  544.                      _global.buttonVis(["button_1","button_2","button_3"]);
  545.                      _global.stepTrue = function(pos)
  546.                      {
  547.                         if(pos == _global.cavemanPos)
  548.                         {
  549.                            return false;
  550.                         }
  551.                         switch(pos)
  552.                         {
  553.                            case 1:
  554.                               if(_global.step == 1)
  555.                               {
  556.                                  _root.gamelevel.button_1._visible = false;
  557.                                  _global.rock = true;
  558.                                  if(_global.rock && _global.stick && _global.sinew)
  559.                                  {
  560.                                     _global.step = 2;
  561.                                  }
  562.                                  return true;
  563.                               }
  564.                               break;
  565.                            case 2:
  566.                               if(_global.step == 1)
  567.                               {
  568.                                  _root.gamelevel.button_2._visible = false;
  569.                                  _global.stick = true;
  570.                                  if(_global.rock && _global.stick && _global.sinew)
  571.                                  {
  572.                                     _global.step = 2;
  573.                                  }
  574.                                  return true;
  575.                               }
  576.                               break;
  577.                            case 3:
  578.                               if(_global.step == 1)
  579.                               {
  580.                                  _root.gamelevel.button_3._visible = false;
  581.                                  _global.sinew = true;
  582.                                  if(_global.rock && _global.stick && _global.sinew)
  583.                                  {
  584.                                     _global.step = 2;
  585.                                  }
  586.                                  return true;
  587.                               }
  588.                               break;
  589.                            case 4:
  590.                               if(_global.step == 2)
  591.                               {
  592.                                  _global.screenX = -190;
  593.                                  _global.step = 3;
  594.                                  _global.stick2 = true;
  595.                                  return true;
  596.                               }
  597.                               break;
  598.                            case 5:
  599.                               if(_global.step == 3)
  600.                               {
  601.                                  _global.step = 4;
  602.                                  return true;
  603.                               }
  604.                               if(_global.step == 2)
  605.                               {
  606.                                  return true;
  607.                               }
  608.                               break;
  609.                            case 6:
  610.                               if(_global.step == 4)
  611.                               {
  612.                                  _global.flint = true;
  613.                                  return true;
  614.                               }
  615.                               break;
  616.                            case 7:
  617.                               if(_global.step == 4)
  618.                               {
  619.                                  return true;
  620.                               }
  621.                               break;
  622.                            case 8:
  623.                               if(_global.step == 4)
  624.                               {
  625.                                  _root.gamelevel.button_8._visible = false;
  626.                                  _global.step = 5;
  627.                                  return true;
  628.                               }
  629.                               break;
  630.                            case 9:
  631.                               if(_global.step == 5)
  632.                               {
  633.                                  return true;
  634.                               }
  635.                               break;
  636.                            case 10:
  637.                               if(_global.step == 5)
  638.                               {
  639.                                  _global.wolvesfed = true;
  640.                                  _global.buttonVis([]);
  641.                                  return true;
  642.                               }
  643.                               break;
  644.                         }
  645.                         return false;
  646.                      };
  647.                      _global.buttonCheck = function(flag)
  648.                      {
  649.                         trace("CHECKIN");
  650.                         _global.walking = false;
  651.                         _root.step_txt.text = "step - " + _global.step;
  652.                         _root.pos_txt.text = "pos - " + _global.cavemanPos;
  653.                         switch(_global.cavemanPos)
  654.                         {
  655.                            case 1:
  656.                               if(_global.rock && _global.stick && _global.sinew)
  657.                               {
  658.                                  setTimeout(addItem,1500,17);
  659.                                  _global.buttonVis(["button_4","button_5"]);
  660.                               }
  661.                               return 1;
  662.                            case 2:
  663.                               if(_global.rock && _global.stick && _global.sinew)
  664.                               {
  665.                                  setTimeout(addItem,1500,17);
  666.                                  _global.buttonVis(["button_4","button_5"]);
  667.                               }
  668.                               return 1;
  669.                            case 3:
  670.                               if(_global.rock && _global.stick && _global.sinew)
  671.                               {
  672.                                  setTimeout(addItem,1500,17);
  673.                                  _global.buttonVis(["button_4","button_5"]);
  674.                               }
  675.                               return 1;
  676.                            case 4:
  677.                               _global.buttonVis(["button_5"]);
  678.                               return 1;
  679.                            case 5:
  680.                               if(_global.stick2)
  681.                               {
  682.                                  return 1;
  683.                               }
  684.                               return 2;
  685.                               break;
  686.                            case 6:
  687.                               return 1;
  688.                            case 7:
  689.                               _global.buttonVis(["button_8"]);
  690.                               return 1;
  691.                            case 8:
  692.                               return 1;
  693.                            case 9:
  694.                               return 1;
  695.                            case 10:
  696.                               return 3;
  697.                            default:
  698.                               return 1;
  699.                         }
  700.                      };
  701.                      break;
  702.                   case 4:
  703.                      _root.attachMovie("level4","gamelevel",1);
  704.                      _root.gamelevel._x = -40;
  705.                      _global.screenX = -40;
  706.                      _global.screenY = 0;
  707.                      _global.charcoal = false;
  708.                      _global.art = false;
  709.                      _global.buttonVis = function(btn)
  710.                      {
  711.                         _root.gamelevel.button_1._visible = false;
  712.                         _root.gamelevel.button_2._visible = false;
  713.                         _root.gamelevel.button_3._visible = false;
  714.                         _root.gamelevel.button_4._visible = false;
  715.                         _root.gamelevel.button_5._visible = false;
  716.                         _root.gamelevel.button_5_._visible = false;
  717.                         _root.gamelevel.button_6._visible = false;
  718.                         _root.gamelevel.button_7._visible = false;
  719.                         i = 0;
  720.                         while(i < btn.length)
  721.                         {
  722.                            var _loc2_ = btn[i];
  723.                            _root.gamelevel[_loc2_]._visible = true;
  724.                            i++;
  725.                         }
  726.                      };
  727.                      _global.buttonVis(["button_1"]);
  728.                      _global.stepTrue = function(pos)
  729.                      {
  730.                         if(pos == _global.cavemanPos)
  731.                         {
  732.                            return false;
  733.                         }
  734.                         switch(pos)
  735.                         {
  736.                            case 1:
  737.                               if(_global.step == 1)
  738.                               {
  739.                                  _global.buttonVis(["button_2"]);
  740.                                  _global.step = 2;
  741.                                  return true;
  742.                               }
  743.                               break;
  744.                            case 2:
  745.                               if(_global.step == 2)
  746.                               {
  747.                                  _global.buttonVis(["button_5_"]);
  748.                                  if(_global.cavemanPos == 1)
  749.                                  {
  750.                                     _global.step = 3;
  751.                                  }
  752.                                  return true;
  753.                               }
  754.                               break;
  755.                            case 3:
  756.                               if(_global.step == 3)
  757.                               {
  758.                                  _global.buttonVis(["button_5_","button_4"]);
  759.                                  _global.step = 4;
  760.                                  return true;
  761.                               }
  762.                               break;
  763.                            case 4:
  764.                               if(_global.step == 4)
  765.                               {
  766.                                  _global.step = 5;
  767.                                  return true;
  768.                               }
  769.                               break;
  770.                            case 5:
  771.                               if(_global.step > 1)
  772.                               {
  773.                                  return true;
  774.                               }
  775.                               break;
  776.                            case 6:
  777.                               if(_global.step == 5)
  778.                               {
  779.                                  trace("CHARCOAL = " + _global.charcoal);
  780.                                  if(_global.charcoal)
  781.                                  {
  782.                                     _global.buttonVis(["button_5"]);
  783.                                     _root.gamelevel.char._visible = false;
  784.                                     _root.gamelevel.caveman_4_6_._x = 0;
  785.                                     _root.gamelevel.caveman_4_6_._y = 0;
  786.                                     _root.gamelevel.caveman_4_6_._alpha = 100;
  787.                                     _root.gamelevel.caveman_4_6_.play();
  788.                                     _global.walking = true;
  789.                                  }
  790.                                  else
  791.                                  {
  792.                                     _root.gamelevel.char._visible = false;
  793.                                     _root.gamelevel.caveman_4_6._x = 0;
  794.                                     _root.gamelevel.caveman_4_6._y = 0;
  795.                                     _root.gamelevel.caveman_4_6._alpha = 100;
  796.                                     _root.gamelevel.caveman_4_6.play();
  797.                                     _global.walking = true;
  798.                                  }
  799.                               }
  800.                               break;
  801.                            case 7:
  802.                               if(_global.step == 5)
  803.                               {
  804.                                  _global.buttonVis(["button_5","button_6"]);
  805.                                  _global.charcoal = true;
  806.                                  trace("GOT CHARCOAL");
  807.                                  return true;
  808.                               }
  809.                               break;
  810.                         }
  811.                         return false;
  812.                      };
  813.                      _global.buttonCheck = function(flag)
  814.                      {
  815.                         trace("CHECKIN");
  816.                         _global.walking = false;
  817.                         _root.step_txt.text = "step - " + _global.step;
  818.                         _root.pos_txt.text = "pos - " + _global.cavemanPos;
  819.                         switch(_global.cavemanPos)
  820.                         {
  821.                            case 1:
  822.                               return 15;
  823.                            case 2:
  824.                               return 15;
  825.                            case 3:
  826.                               return 15;
  827.                            case 4:
  828.                               return 1;
  829.                            case 5:
  830.                               return 1;
  831.                            case 6:
  832.                               return 1;
  833.                            case 7:
  834.                               return 1;
  835.                            default:
  836.                               return 1;
  837.                         }
  838.                      };
  839.                      break;
  840.                   case 5:
  841.                      _root.attachMovie("level5","gamelevel",1);
  842.                      _global.screenX = 0;
  843.                      _global.screenY = 0;
  844.                      _global.hiding = false;
  845.                      _global.bow = false;
  846.                      _global.sinew = false;
  847.                      _global.arrows = false;
  848.                      _global.feathers = false;
  849.                      _global.gotbow = false;
  850.                      _global.leaves = false;
  851.                      _global.pit = false;
  852.                      _global.mammothCharge = false;
  853.                      _global.mammothDir = -1;
  854.                      _global.buttonVis = function(btn)
  855.                      {
  856.                         _root.gamelevel.button_1._visible = false;
  857.                         _root.gamelevel.button_2._visible = false;
  858.                         _root.gamelevel.button_3._visible = false;
  859.                         _root.gamelevel.button_4._visible = false;
  860.                         _root.gamelevel.button_5._visible = false;
  861.                         _root.gamelevel.button_6._visible = false;
  862.                         _root.gamelevel.button_7._visible = false;
  863.                         _root.gamelevel.button_8._visible = false;
  864.                         _root.gamelevel.button_9._visible = false;
  865.                         i = 0;
  866.                         while(i < btn.length)
  867.                         {
  868.                            var _loc2_ = btn[i];
  869.                            _root.gamelevel[_loc2_]._visible = true;
  870.                            i++;
  871.                         }
  872.                      };
  873.                      _global.buttonVis(["button_1","button_2","button_3","button_4","button_8"]);
  874.                      _global.mammothTurn = false;
  875.                      _root.gamelevel.onEnterFrame = function()
  876.                      {
  877.                         if(_global.mammothCharge && !_global.mammothTurn)
  878.                         {
  879.                            _root.gamelevel.mammoth._x += 5 * _global.mammothDir;
  880.                            if(_root.gamelevel.mammoth._x < 100 && _global.mammothDir == -1)
  881.                            {
  882.                               _global.mammothDir = 1;
  883.                               _global.mammothTurn = true;
  884.                               _root.gamelevel.mammoth.gotoAndStop(3);
  885.                            }
  886.                            else if(_root.gamelevel.mammoth._x > 556 && !_global.pit)
  887.                            {
  888.                               _global.mammothDir = -1;
  889.                               _global.mammothCharge = false;
  890.                               _root.gamelevel.mammoth.gotoAndStop(5);
  891.                            }
  892.                            else if(_root.gamelevel.mammoth._x > 680)
  893.                            {
  894.                               _global.mammothDir = -1;
  895.                               _global.mammothCharge = false;
  896.                               _root.gamelevel.mammoth.gotoAndStop(6);
  897.                            }
  898.                            if(!_global.hiding && _global.cavemanPos != 4 && _global.cavemanPos != 2 && _global.cavemanPos != 7)
  899.                            {
  900.                               if(_root.gamelevel.mammoth._x - 25 < _root.gamelevel.char._x && _global.mammothDir == -1 && _root.gamelevel.mammoth._x > _root.gamelevel.char._x)
  901.                               {
  902.                                  _global.walking = true;
  903.                                  _global.mammothCharge = false;
  904.                                  _root.gamelevel.mammoth.gotoAndStop(7);
  905.                               }
  906.                               if(_root.gamelevel.mammoth._x + 25 > _root.gamelevel.char._x && _global.mammothDir == 1 && _root.gamelevel.mammoth._x < _root.gamelevel.char._x)
  907.                               {
  908.                                  _global.walking = true;
  909.                                  _global.mammothCharge = false;
  910.                                  _root.gamelevel.mammoth.gotoAndStop(8);
  911.                               }
  912.                            }
  913.                         }
  914.                      };
  915.                      _root.gamelevel.mammoth.btn.onPress = function()
  916.                      {
  917.                         if(!_global.walking && !_global.mammothCharge)
  918.                         {
  919.                            if(_global.cavemanPos == 4)
  920.                            {
  921.                               _root.gamelevel.char.gotoAndStop(14);
  922.                            }
  923.                            else
  924.                            {
  925.                               _root.gamelevel.char.gotoAndStop(13);
  926.                            }
  927.                            _root.gamelevel.mammoth.btn._visible = false;
  928.                         }
  929.                      };
  930.                      _global.goMammoth = function()
  931.                      {
  932.                         _root.gamelevel.mammoth.gotoAndStop(2);
  933.                         _global.mammothCharge = true;
  934.                         _global.mammothTurn = false;
  935.                      };
  936.                      _root.gamelevel.mammoth.btn.tabEnabled = false;
  937.                      _root.gamelevel.mammoth.btn._visible = false;
  938.                      _global.checkBow = function()
  939.                      {
  940.                         if(_global.bow && _global.sinew && _global.arrows && _global.feathers && !_global.gotbow)
  941.                         {
  942.                            _global.gotbow = true;
  943.                            _global.step = 2;
  944.                            _root.gamelevel.button_5._visible = true;
  945.                            _root.gamelevel.mammoth.btn._visible = true;
  946.                         }
  947.                      };
  948.                      _global.stepTrue = function(pos)
  949.                      {
  950.                         if(pos == 8 && (_global.cavemanPos == 5 || _global.cavemanPos == 3 || _global.cavemanPos == 1 || _global.cavemanPos == 0))
  951.                         {
  952.                            _root.gamelevel.button_8._visible = false;
  953.                            _root.gamelevel.button_9._visible = true;
  954.                            _global.walking = true;
  955.                            _global.hiding = true;
  956.                            _root.gamelevel.char.gotoAndStop(9);
  957.                            return false;
  958.                         }
  959.                         if(_global.mammothCharge && pos != 7 && pos != 6)
  960.                         {
  961.                            return false;
  962.                         }
  963.                         if(pos == _global.cavemanPos)
  964.                         {
  965.                            return false;
  966.                         }
  967.                         switch(pos)
  968.                         {
  969.                            case 1:
  970.                               if(_global.cavemanPos != 8 && _global.step == 1 && !_global.gotbow || _global.cavemanPos == 8 && _global.oldPos == pos)
  971.                               {
  972.                                  _global.arrowMC = "arrow1";
  973.                                  _root.gamelevel.button_8._visible = true;
  974.                                  _root.gamelevel.button_1._visible = false;
  975.                                  _global.bow = true;
  976.                                  _global.checkBow();
  977.                                  return true;
  978.                               }
  979.                               break;
  980.                            case 2:
  981.                               if((_global.step == 1 || _global.step == 2) && _global.cavemanPos != 8)
  982.                               {
  983.                                  _global.arrowMC = "arrow2";
  984.                                  _global.sinew = true;
  985.                                  _global.checkBow();
  986.                                  if(_global.leaves)
  987.                                  {
  988.                                     _global.arrowMC = "arrow2_2";
  989.                                     _global.screenX = -273;
  990.                                     _root.gamelevel.mammoth.btn._visible = true;
  991.                                  }
  992.                                  _root.gamelevel.button_8._visible = false;
  993.                                  _root.gamelevel.button_2._visible = false;
  994.                                  return true;
  995.                               }
  996.                               break;
  997.                            case 3:
  998.                               if(_global.cavemanPos != 8 && _global.step == 1 && !_global.gotbow || _global.cavemanPos == 8 && _global.oldPos == pos)
  999.                               {
  1000.                                  _global.arrowMC = "arrow3";
  1001.                                  _root.gamelevel.button_8._visible = true;
  1002.                                  _root.gamelevel.button_3._visible = false;
  1003.                                  _global.arrows = true;
  1004.                                  _global.checkBow();
  1005.                                  return true;
  1006.                               }
  1007.                               break;
  1008.                            case 4:
  1009.                               if(_global.step == 1 && !_global.gotbow && _global.cavemanPos != 8)
  1010.                               {
  1011.                                  _global.arrowMC = "arrow4";
  1012.                                  _root.gamelevel.button_8._visible = false;
  1013.                                  _root.gamelevel.button_4._visible = false;
  1014.                                  _global.feathers = true;
  1015.                                  _global.checkBow();
  1016.                                  return true;
  1017.                               }
  1018.                               break;
  1019.                            case 5:
  1020.                               if(_global.cavemanPos != 8 && _global.step == 2 && _global.gotbow || _global.cavemanPos == 8 && _global.oldPos == pos)
  1021.                               {
  1022.                                  _global.arrowMC = "arrow5";
  1023.                                  _root.gamelevel.mammoth.btn._visible = true;
  1024.                                  _root.gamelevel.button_8._visible = true;
  1025.                                  _root.gamelevel.button_5._visible = false;
  1026.                                  _root.gamelevel.button_2._visible = true;
  1027.                                  _root.gamelevel.button_6._visible = true;
  1028.                                  _root.gamelevel.button_7._visible = true;
  1029.                                  _global.leaves = true;
  1030.                                  return true;
  1031.                               }
  1032.                               break;
  1033.                            case 6:
  1034.                               if(_global.leaves)
  1035.                               {
  1036.                                  _root.gamelevel.button_6._visible = false;
  1037.                                  return true;
  1038.                               }
  1039.                               break;
  1040.                            case 7:
  1041.                               if(_global.pit)
  1042.                               {
  1043.                                  _root.gamelevel.button_7._visible = false;
  1044.                                  _root.gamelevel.char._x = 800;
  1045.                                  return true;
  1046.                               }
  1047.                               break;
  1048.                            case 8:
  1049.                               if(_global.cavemanPos == 1 || _global.cavemanPos == 3 || _global.cavemanPos == 5)
  1050.                               {
  1051.                                  _root.gamelevel.button_8_5._visible = true;
  1052.                                  _root.gamelevel.button_8._visible = false;
  1053.                               }
  1054.                               break;
  1055.                            case 8.5:
  1056.                               if(_global.cavemanPos == 1 || _global.cavemanPos == 3 || _global.cavemanPos == 5)
  1057.                               {
  1058.                                  _root.gamelevel.button_8_5._visible = false;
  1059.                                  _root.gamelevel.button_8._visible = true;
  1060.                               }
  1061.                         }
  1062.                         return false;
  1063.                      };
  1064.                      _global.buttonCheck = function(flag)
  1065.                      {
  1066.                         _global.walking = false;
  1067.                         _root.step_txt.text = "step - " + _global.step;
  1068.                         _root.pos_txt.text = "pos - " + _global.cavemanPos;
  1069.                         switch(_global.cavemanPos)
  1070.                         {
  1071.                            case 1:
  1072.                               if(_global.sinew)
  1073.                               {
  1074.                                  setTimeout(addItem,1500,16);
  1075.                               }
  1076.                               return 1;
  1077.                            case 2:
  1078.                               if(!_global.leaves)
  1079.                               {
  1080.                                  if(_global.bow)
  1081.                                  {
  1082.                                     setTimeout(addItem,1500,16);
  1083.                                  }
  1084.                               }
  1085.                               return 1;
  1086.                            case 3:
  1087.                               if(_global.feathers)
  1088.                               {
  1089.                                  setTimeout(addItem,1500,15);
  1090.                               }
  1091.                               return 1;
  1092.                            case 4:
  1093.                               if(_global.arrows)
  1094.                               {
  1095.                                  setTimeout(addItem,1500,15);
  1096.                               }
  1097.                               return 6;
  1098.                            case 5:
  1099.                               return 1;
  1100.                            case 6:
  1101.                               _global.pit = true;
  1102.                               return 1;
  1103.                            case 7:
  1104.                               return 1;
  1105.                            case 8:
  1106.                               return 6;
  1107.                            case 9:
  1108.                               return 1;
  1109.                            case 10:
  1110.                               return 3;
  1111.                            case 11:
  1112.                               return 1;
  1113.                            case 12:
  1114.                               return 1;
  1115.                            default:
  1116.                               return 1;
  1117.                         }
  1118.                      };
  1119.                      break;
  1120.                   case 6:
  1121.                      _root.attachMovie("level6","gamelevel",1);
  1122.                      _root.gamelevel._y = -200;
  1123.                      _global.screenX = 0;
  1124.                      _global.screenY = -200;
  1125.                      _global.fire = false;
  1126.                      _global.armoury = false;
  1127.                      _global.flint = false;
  1128.                      _global.firethrow = false;
  1129.                      _global.stone = false;
  1130.                      _global.buttonVis = function(btn)
  1131.                      {
  1132.                         _root.gamelevel.button_1._visible = false;
  1133.                         _root.gamelevel.button_2._visible = false;
  1134.                         _root.gamelevel.button_3._visible = false;
  1135.                         _root.gamelevel.button_4._visible = false;
  1136.                         _root.gamelevel.button_5._visible = false;
  1137.                         _root.gamelevel.button_6._visible = false;
  1138.                         _root.gamelevel.button_7._visible = false;
  1139.                         _root.gamelevel.button_8._visible = false;
  1140.                         _root.gamelevel.button_9._visible = false;
  1141.                         _root.gamelevel.button_10._visible = false;
  1142.                         _root.gamelevel.button_11._visible = false;
  1143.                         i = 0;
  1144.                         while(i < btn.length)
  1145.                         {
  1146.                            var _loc2_ = btn[i];
  1147.                            _root.gamelevel[_loc2_]._visible = true;
  1148.                            i++;
  1149.                         }
  1150.                      };
  1151.                      _global.buttonVis(["button_1"]);
  1152.                      _root.gamelevel.stone.onPress = function()
  1153.                      {
  1154.                         _global.walking = true;
  1155.                         _root.gamelevel.char.gotoAndStop(12);
  1156.                      };
  1157.                      _global.stepTrue = function(pos)
  1158.                      {
  1159.                         if(pos != 10)
  1160.                         {
  1161.                            if(pos == _global.cavemanPos)
  1162.                            {
  1163.                               return false;
  1164.                            }
  1165.                         }
  1166.                         switch(pos)
  1167.                         {
  1168.                            case 1:
  1169.                               if(_global.step == 1)
  1170.                               {
  1171.                                  _global.stick = true;
  1172.                                  return true;
  1173.                               }
  1174.                               break;
  1175.                            case 2:
  1176.                               if(_global.step == 1)
  1177.                               {
  1178.                                  return true;
  1179.                               }
  1180.                               break;
  1181.                            case 3:
  1182.                               if(_global.step == 1)
  1183.                               {
  1184.                                  _root.gamelevel.button_4._visible = true;
  1185.                                  _root.gamelevel.button_3._visible = false;
  1186.                                  _global.fire = true;
  1187.                                  return true;
  1188.                               }
  1189.                               break;
  1190.                            case 4:
  1191.                               if(_global.step == 1)
  1192.                               {
  1193.                                  _root.gamelevel.button_4._visible = false;
  1194.                                  _root.gamelevel.button_3._visible = true;
  1195.                                  return true;
  1196.                               }
  1197.                               break;
  1198.                            case 5:
  1199.                               if(_global.step == 1)
  1200.                               {
  1201.                                  _root.gamelevel.button_3._visible = false;
  1202.                                  _root.gamelevel.button_4._visible = false;
  1203.                                  _root.gamelevel.button_6._visible = false;
  1204.                                  return true;
  1205.                               }
  1206.                               break;
  1207.                            case 6:
  1208.                               if(_global.step == 1)
  1209.                               {
  1210.                                  _root.gamelevel.button_3._visible = false;
  1211.                                  _root.gamelevel.button_4._visible = false;
  1212.                                  _root.gamelevel.button_5._visible = false;
  1213.                                  _root.gamelevel.button_6._visible = false;
  1214.                                  return true;
  1215.                               }
  1216.                               break;
  1217.                            case 7:
  1218.                               if(_global.step == 1)
  1219.                               {
  1220.                                  return true;
  1221.                               }
  1222.                               break;
  1223.                            case 8:
  1224.                               _global.buttonVis(["button_9"]);
  1225.                               if(_global.step == 1)
  1226.                               {
  1227.                                  _global.step = 2;
  1228.                                  return true;
  1229.                               }
  1230.                               break;
  1231.                            case 9:
  1232.                               if(_global.step == 2)
  1233.                               {
  1234.                                  _global.buttonVis(["button_10"]);
  1235.                                  _global.step = 3;
  1236.                                  return true;
  1237.                               }
  1238.                               break;
  1239.                            case 11:
  1240.                               _root.gamelevel.caveman_9_10.play();
  1241.                               _root.gamelevel.button_11._visible = false;
  1242.                               break;
  1243.                            default:
  1244.                               break;
  1245.                            case 10:
  1246.                               if(_global.step == 3)
  1247.                               {
  1248.                                  _root.gamelevel.button_10._visible = false;
  1249.                               }
  1250.                               return true;
  1251.                         }
  1252.                         return false;
  1253.                      };
  1254.                      _global.buttonCheck = function(flag)
  1255.                      {
  1256.                         trace("CHECKIN");
  1257.                         _global.walking = false;
  1258.                         _root.step_txt.text = "step - " + _global.step;
  1259.                         _root.pos_txt.text = "pos - " + _global.cavemanPos;
  1260.                         switch(_global.cavemanPos)
  1261.                         {
  1262.                            case 1:
  1263.                               _global.walking = true;
  1264.                               return 1;
  1265.                            case 2:
  1266.                               _global.buttonVis(["button_3","button_4","button_5","button_6"]);
  1267.                               _global.screenX = -108;
  1268.                               _global.screenY = -435;
  1269.                               return 1;
  1270.                            case 3:
  1271.                               return 1;
  1272.                            case 4:
  1273.                               if(!_global.fire)
  1274.                               {
  1275.                                  return 1;
  1276.                               }
  1277.                               _global.armoury = true;
  1278.                               return 1;
  1279.                               break;
  1280.                            case 5:
  1281.                               _global.walking = true;
  1282.                               return 1;
  1283.                            case 6:
  1284.                               return 1;
  1285.                            case 7:
  1286.                               _global.walking = true;
  1287.                               return 1;
  1288.                            case 8:
  1289.                               return 1;
  1290.                            case 9:
  1291.                               return 1;
  1292.                            case 10:
  1293.                               return 1;
  1294.                            default:
  1295.                               return 1;
  1296.                         }
  1297.                      };
  1298.                }
  1299.                _root.attachMovie("timer_mc","timer_mc",300);
  1300.                _root.timer_mc.time_txt.text = _global.timer;
  1301.                _root.timer_mc.time_txt2.text = _global.timer;
  1302.                _root.timer_mc.pause_btn._visible = false;
  1303.                _root.attachMovie("mask_mc","mask_mc",250);
  1304.                _root.attachMovie("mask_mc","mask_mc2",251);
  1305.                _root.gamelevel.setMask("mask_mc");
  1306.                _root.skybackground.setMask("mask_mc2");
  1307.             };
  1308.             this.onEnterFrame = function()
  1309.             {
  1310.                if(!_root.paws)
  1311.                {
  1312.                   _global.timeStep = _global.timeStep + 1;
  1313.                   if(_global.timeStep == 24)
  1314.                   {
  1315.                      _global.timeStep = 0;
  1316.                      _global.timer = _global.timer - 1;
  1317.                      if(_global.timer == -1)
  1318.                      {
  1319.                         _global.timer = 0;
  1320.                      }
  1321.                      _root.timer_mc.time_txt.text = _global.timer;
  1322.                      _root.timer_mc.time_txt2.text = _global.timer;
  1323.                   }
  1324.                   if(_global.item)
  1325.                   {
  1326.                      _root.gamelevel.item._y--;
  1327.                      if(_root.gamelevel.item._y < -20)
  1328.                      {
  1329.                         _root.gamelevel.item._alpha--;
  1330.                      }
  1331.                      if(_root.gamelevel.item._alpha < 0)
  1332.                      {
  1333.                         _root.gamelevel.item.removeMovieClip();
  1334.                         _global.item = false;
  1335.                      }
  1336.                   }
  1337.                   if(_root.gamelevel._x > _global.screenX)
  1338.                   {
  1339.                      _root.gamelevel._x -= 2;
  1340.                   }
  1341.                   if(_root.gamelevel._x < _global.screenX)
  1342.                   {
  1343.                      _root.gamelevel._x += 2;
  1344.                   }
  1345.                   if(_root.gamelevel._y > _global.screenY)
  1346.                   {
  1347.                      _root.gamelevel._y -= 2;
  1348.                   }
  1349.                   if(_root.gamelevel._y < _global.screenY)
  1350.                   {
  1351.                      _root.gamelevel._y += 2;
  1352.                   }
  1353.                }
  1354.             };
  1355.             _global.deadPopUp = function()
  1356.             {
  1357.                _root.score = game.score;
  1358.                _root.paws = true;
  1359.                _root.timer_mc.pause_btn._visible = false;
  1360.                stopAllSounds();
  1361.                _root.paws = true;
  1362.                _root.attachMovie("dead","dead",2);
  1363.                _root.dead.score_txt.text = game.score;
  1364.                _root.dead.score_txt2.text = game.score;
  1365.                _root.dead.replay_btn.onPress = function()
  1366.                {
  1367.                   removeMovieClip(_root.mask_mc2);
  1368.                   removeMovieClip(_root.mask_mc);
  1369.                   removeMovieClip(_root.skybackground);
  1370.                   removeMovieClip(_root.dead);
  1371.                   loadLevel(game.level);
  1372.                };
  1373.                _root.dead.main_btn.onPress = function()
  1374.                {
  1375.                   game.score = 0;
  1376.                   removeMovieClip(_root.mask_mc);
  1377.                   removeMovieClip(_root.mask_mc2);
  1378.                   removeMovieClip(_root.gamelevel);
  1379.                   removeMovieClip(_root.skybackground);
  1380.                   removeMovieClip(_root.dead);
  1381.                   removeMovieClip(_root.timer_mc);
  1382.                   stopAllSounds();
  1383.                   _root.secondPlay = true;
  1384.                   _root.play();
  1385.                };
  1386.             };
  1387.             _global.winLevelPopUp = function()
  1388.             {
  1389.                _root.paws = true;
  1390.                _root.timer_mc.pause_btn._visible = false;
  1391.                stopAllSounds();
  1392.                _root.attachMovie("dead","winlevel",2);
  1393.                _root.winlevel.gotoAndStop(2);
  1394.                _root.winlevel.bonus_txt.text = _global.timer * 10;
  1395.                _root.winlevel.bonus_txt2.text = _global.timer * 10;
  1396.                game.score += _global.timer * 10;
  1397.                game.score += 100 * game.level;
  1398.                _root.winlevel.score_txt.text = game.score;
  1399.                _root.winlevel.level_txt.text = 100 * game.level;
  1400.                _root.score = game.score;
  1401.                _root.winlevel.btn.onPress = function()
  1402.                {
  1403.                   _root.panels._visible = true;
  1404.                   switch(game.level)
  1405.                   {
  1406.                      case 1:
  1407.                         _root.panels.gotoAndStop(6);
  1408.                         break;
  1409.                      case 2:
  1410.                         _root.panels.gotoAndStop(8);
  1411.                         break;
  1412.                      case 3:
  1413.                         _root.panels.gotoAndStop(10);
  1414.                         break;
  1415.                      case 4:
  1416.                         _root.panels.gotoAndStop(12);
  1417.                         break;
  1418.                      case 5:
  1419.                         _root.panels.gotoAndStop(14);
  1420.                         break;
  1421.                      case 6:
  1422.                         _root.panels.gotoAndStop(16);
  1423.                   }
  1424.                   game.level = game.level + 1;
  1425.                   removeMovieClip(_root.mask_mc);
  1426.                   removeMovieClip(_root.mask_mc2);
  1427.                   removeMovieClip(_root.skybackground);
  1428.                   removeMovieClip(_root.winlevel);
  1429.                   removeMovieClip(_root.gamelevel);
  1430.                   removeMovieClip(_root.timer_mc);
  1431.                };
  1432.             };
  1433.             _global.setButton = function(mc, pos)
  1434.             {
  1435.                mc.onPress = function()
  1436.                {
  1437.                   if(!_root.paws)
  1438.                   {
  1439.                      if(pos == 9 && game.level == 5 && _global.walking)
  1440.                      {
  1441.                         _root.gamelevel.button_8._visible = true;
  1442.                         _root.gamelevel.button_9._visible = false;
  1443.                         _root.gamelevel.char.char.play();
  1444.                      }
  1445.                      if(!_global.walking && _global.stepTrue(pos) && !_root.paws)
  1446.                      {
  1447.                         _global.walking = true;
  1448.                         _root.gamelevel.char._visible = false;
  1449.                         var _loc3_ = "caveman_" + _global.cavemanPos + "_" + pos;
  1450.                         if(_global.double)
  1451.                         {
  1452.                            _loc3_ = "caveman_" + _global.cavemanPos + "_" + _global.oldPos;
  1453.                         }
  1454.                         trace("caveman symbol = " + _loc3_);
  1455.                         _root.gamelevel[_loc3_]._x = 0;
  1456.                         _root.gamelevel[_loc3_]._y = 0;
  1457.                         _root.gamelevel[_loc3_]._visible = true;
  1458.                         _root.gamelevel[_loc3_]._alpha = 100;
  1459.                         _root.gamelevel[_loc3_].gotoAndPlay(2);
  1460.                         _global.debugTrace("walking from pos " + _global.cavemanPos + " to pos " + pos);
  1461.                      }
  1462.                   }
  1463.                };
  1464.                mc.tabEnabled = false;
  1465.             };
  1466.             break;
  1467.          }
  1468.          if(eval("\x01") == 878)
  1469.          {
  1470.             set("\x01",eval("\x01") - 276);
  1471.          }
  1472.          else
  1473.          {
  1474.             if(eval("\x01") != 465)
  1475.             {
  1476.                if(eval("\x01") == 988)
  1477.                {
  1478.                   set("\x01",eval("\x01") - 988);
  1479.                }
  1480.                break;
  1481.             }
  1482.             set("\x01",eval("\x01") + 413);
  1483.             if(function ┬º\x04\x05┬º()
  1484.             {
  1485.                set("\x03",1193 % 511 * true);
  1486.                return eval("\x03");
  1487.             })
  1488.             {
  1489.                set("\x01",eval("\x01") - 276);
  1490.             }
  1491.          }
  1492.       }
  1493.    }
  1494. }
  1495.